package com.project.im.web.controller;

import com.project.im.app.dto.WebUserDetails;
import com.project.im.app.vo.ResponseVO;
import com.project.im.common.annotation.Log;
import com.project.im.web.service.WebUserInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "用户管理")
@RestController
@RequestMapping("/web/v1/user")
@RequiredArgsConstructor
public class UserWebController {

    private final WebUserInfoService webUserInfoService;

    @Log("用户管理-用户信息")
    @Operation(summary = "用户信息")
    @PostMapping("/info")
    public ResponseVO<WebUserDetails> getUserInfo() {
        return ResponseVO.success(webUserInfoService.getUserInfo());
    }

}
